/*
 * 练习2：这个练习从基类到继承类，都是自己设计的^.^
 * 练习2：继承自Animal类，覆盖 jiaoSheng()方法，，并添加一个新方法 Run();
 */
package chapter7_Reusing;
import chapter7_Reusing.extPacge.Animal;
import publicLibs.p;

public class E2_Dog extends Animal{
	
	private String name = "Dog";

	protected void jiaoSheng(){
		p.p("The Dog is barking.");
	}
	
	protected void run(){
		p.p("The Dog is running.");
	}
	
	public E2_Dog(){
		p.p("Dog consturctor");
	}

	public static void main(String[] args) {
		E2_Dog dog = new E2_Dog();
		dog.jiaoSheng();
		dog.run();
		dog.movement();
		p.p( dog.toString());
	}

}
